package com.adnaan.restaurant.service.impl;

import com.adnaan.restaurant.entity.ResDishes;
import com.adnaan.restaurant.mapper.ResDishesMapper;
import com.adnaan.restaurant.service.IResDishesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: adnaan
 * create: 2023-11-08 18:46
 * Description:
 */
@Service
public class ResDishesServiceImpl implements IResDishesService {
    @Autowired
    private ResDishesMapper resDishesMapper;

    /**
     * 查询菜品管理
     *
     * @param id 菜品管理主键
     * @return 菜品管理
     */
    @Override
    public ResDishes selectResDishesById(Long id) {
        return resDishesMapper.selectResDishesById(id);
    }

    /**
     * 查询菜品管理列表
     *
     * @return 菜品管理
     */
    @Override
    public List<ResDishes> selectResDishesList(Long shopId) {
        return resDishesMapper.selectResDishesList(shopId);
    }

    @Override
    public List<ResDishes> selectResDishesByName(String name) {
        return resDishesMapper.selectResDishesByName(name);
    }
}
